<template>
    <!-- 我的打分 -->
    <div class="grade">
        <van-tabs @change="onChangeType" title-active-color="#02a7f0" title-inactive-color="#7f7f7f" line-width="0" line-height="0" sticky swipeable>
            <van-tab title="已完成">
                <div class="finished" v-for="(val,index) in 5">
                    <div class="tag">
                        已完成
                        <span></span>
                    </div>
                    <div class="content">
                        <div class="title">
                            <div><span>主题：</span><span>信息安全培训</span></div>
                            <div class="time">一周前</div>
                        </div>
                        <div><span>项目组：</span><span>信息安全培训</span></div>
                        <div><span>有效时间：</span><span>2022.08.10 ~ 2022.08.12</span></div>
                    </div>
                </div>
            </van-tab>
            <van-tab title="进行中">
                <div class="going" v-for="(val,index) in 2">
                    <div class="content">
                        <div class="contentFlex">
                            <div>
                                <span>主题：</span><span>信息安全培训</span>
                            </div>
                            <div class="time">1小时前</div>
                        </div>
                        <div>
                            <span>项目组：</span><span>信息安全培训</span>
                        </div>
                        <div>
                            <span>项目组成员人数：</span><span style="color: #02a7f0;">10人</span>
                        </div>
                        <div>
                            <span>未被打分人数：</span><span style="color: #f8a723;">3人</span>
                        </div>
                        <div>
                            <span>有效时间：</span><span>2022.08.22 ~ 2022.08.24</span>
                        </div>
                    </div>
                    <div class="btn" @click="onClickBtn">去打分</div>
                </div>
            </van-tab>
        </van-tabs>
    </div>
</template>

<script>
export default{
    data() {
        return {

        }
    },
    methods: {
        onChangeType(e){
            console.log(e.mp.detail.name);
        },
        onClickBtn(){
            console.log('btn');
        }
    }
}
</script>

<style scoped>
/* 已完成 */
.finished{
    background-color: #fff;
    margin: 30rpx;
    display: flex;
    align-items: flex-start;
    border-radius: 5%;
}
.tag{
    width: 50rpx;
    background-color: #1afa29;
    font-size: 20rpx;
    color: #f1fff2;
    font-weight: bold;
    padding: 5rpx 13rpx 0 13rpx;
    box-sizing: border-box;
    height: 100rpx;
    position: relative;
}
.tag span{
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border: 25rpx solid transparent;
    border-bottom-color: #fff;
}
.finished .content{
    flex: 1;
    box-sizing: border-box;
    padding: 30rpx;
    font-size: 28rpx;
    line-height: 60rpx;
    color: #555555;
}
.finished .content .title{
    font-size: 28rpx;
    display: flex;
    justify-content: space-between;
}
.finished .content .time{
    font-size: 24rpx;
    color: #d7d7d7;
}
/* 进行中 */
.going{
    margin: 30rpx;
    line-height: 60rpx;
}
.going .content{
    padding: 30rpx 30rpx 30rpx 60rpx;
    box-sizing: border-box;
    background-color: #fff;
    border-radius: 5% 5% 0 0;
    font-size: 28rpx;
    color: #555555;
}
.going .content .contentFlex{
    display: flex;
    justify-content: space-between;
}
.going .content .time{
    font-size: 24rpx;
    color: #d7d7d7;
}
.going .btn{
    margin-top: 5rpx;
    background-color: #fff;
    border-radius: 0 0 5% 5%;
    height: 106rpx;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #02a7f0;
}
</style>